# extends 'base.html'

# block content
  <div class="page-header">
    <h1>{{title}}</h1>
  </div>

  <div class="row text-center">
    {{admin_link('App Config', 'cog', url_for('admin_config'))}}
    {{admin_link('Auth Config', 'lock', url_for('admin_auth'))}}
    {{admin_link('Test', 'sliders', url_for('admin_test'))}}
  </div>

  <div class="page-header">
    <h2>Models</h2>
  </div>

  <div class="row text-center">
    {{admin_link('User List', 'group', url_for('user_list', order='-modified', active=True))}}
  </div>

  <div class="page-header">
    <h2>
      Google Cloud Platform
      <small title="Application ID">({{config.APPLICATION_ID}})</small>
    </h2>
  </div>

  <div class="row text-center">
    # if localhost
      {{admin_link('Localhost', 'home', localhost, 'gae')}}
    # endif
    {{admin_link('Dashboard', 'tachometer', 'https://console.cloud.google.com/home/dashboard?project=%s' % config.APPLICATION_ID, 'gae')}}
    {{admin_link('Datastore', 'database', 'https://console.cloud.google.com/datastore/query?project=%s' % config.APPLICATION_ID, 'gae')}}
    {{admin_link('Instances', 'bolt', 'https://console.cloud.google.com/appengine/instances?project=%s' % config.APPLICATION_ID, 'gae')}}
    {{admin_link('Versions', 'history', 'https://console.cloud.google.com/appengine/versions?project=%s' % config.APPLICATION_ID, 'gae')}}
    {{admin_link('Logs', 'bullhorn', 'https://console.cloud.google.com/logs?project=%s&amp;versionId=%s' % (config.APPLICATION_ID, config.CURRENT_VERSION_NAME), 'gae')}}
    {{admin_link('APIs', 'wrench', 'https://console.developers.google.com/apis/library?project=%s' % config.APPLICATION_ID, 'gae')}}
    {{admin_link('Settings', 'cogs', 'https://console.cloud.google.com/appengine/settings?project=%s' % config.APPLICATION_ID, 'gae')}}
    {{admin_link('Billing', 'credit-card', 'https://console.cloud.google.com/billing', 'gae')}}
  </div>

# endblock


# macro admin_link(title, icon, url, target='_self')
  <div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
    <a class="text-muted" href="{{url}}" target="{{target}}">
      <h4><span class="fa fa-fw fa-3x fa-{{icon}}"></span></h4>
      <h4 class="ellipsis">{{title}}</h4>
    </a>
  </div>
# endmacro
